.<template>
  <div>
    <button @click="isShow = !isShow">显示/隐藏</button>
    <transition name="txbbb" appear>
      <h1 v-show="isShow">你好啊！</h1>
    </transition>
  </div>
</template>

<script >
export default {
  name:'myTest',
  data(){
    return{
      isShow:true
    }
  }
}
</script>

<style scoped>
  h1{
    background: skyblue;
    transform: .5s;
  }
  .txbbb-enter-active{
    animation: tx .5s linear;
  }
  .txbbb-leave-active{
    animation: tx .5s reverse linear;
  }
  @keyframes tx {
    from{
      transform: translateX(-100%);
    }
    to{
      transform: translateX(0);
    }
  }
</style>